/*
 * MIT License
 *
 * Copyright (c) 2025 Mark·虎
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

package com.hsxxherp.key.support.i18n.service;

import com.hsxxherp.key.support.i18n.model.entity.I18nLocale;
import com.hsxxherp.key.support.model.entity.AdvancedQuery;
import com.hsxxherp.key.support.service.IMPJBaseService;

import java.util.List;

/**
 * 国际化语种服务接口
 * <p>
 * 该接口定义了与国际化语种相关的业务操作方法，如注册、获取、更新和删除语种信息等。
 * </p>
 * @author Mark·虎克（2486970363@qq.com）
 * @since 2025-01-25
 */
public interface II18nLocaleService extends IMPJBaseService<I18nLocale> {

    /**
     * 注册语种
     *
     * @param locale 语种信息
     * @return {@see I18nLocale} 注册后的语种信息
     */
    I18nLocale registerLocale(I18nLocale locale);

    /**
     * 获取所有语种信息
     *
     * @return {@see List<I18nLocale>} 包含所有语种信息的列表
     */
    List<I18nLocale> getAllLocales();

    /**
     * 更新语种信息
     *
     * @param locale 语种信息
     * @return {@see I18nLocale} 更新后的语种信息
     */
    I18nLocale updateLocale(I18nLocale locale);

    /**
     * 删除语种
     *
     * @param id 语种的唯一标识
     * @return true 如果删除成功，false 否则
     */
    boolean deleteLocale(String id);

    /**
     * 高级查询国际化语种信息
     *
     * @param query 高级查询条件对象
     * @return {@see List<I18nLocale>} 符合查询条件的语种信息列表
     */
    List<I18nLocale> advancedQueryI18nLocales(AdvancedQuery query);
}